<form-item label="领取方式" prop="get_method">
    <radio-group v-model="formValidate.get_method"  button-style="solid">
        <template v-for="(items, index) in baseInfoConfig.get_method">
            <radio :label="items.value" :value="items.value" :key="items.value" border>{{items.label}}</radio>
        </template>
    </radio-group>
<!--    <span class="_forms-tips"><icon type="md-alert"></icon> 首页弹窗最多可显示2个，多余的需要到领劵中心领取</span>-->
</form-item>

<form-item label="发放范围" prop="grant_method" v-if="formValidate.get_method < 4">
    <radio-group v-model="formValidate.grant_method" button-style="solid">
        <template v-for="(items, index) in baseInfoConfig.grant_method">
            <radio :label="items.value" :value="items.value" :key="items.value" border>{{items.label}}</radio>
        </template>
    </radio-group>
    <span class="_forms-tips"><icon type="md-alert"></icon> 全部用户：所有用户都可领取；指定区域：指定区域内的用户可领取；指定用户：指定用户可领取；</span>
</form-item>

<form-item label="发放区域" prop="grant_agent_id" v-if="formValidate.grant_method == 2">
    <i-select v-model="formValidate.grant_agent_id" placeholder="请选择发放区域"
              multiple filterable :loading="grant_agent_loading"
              :model-value="formValidate.grant_agent_id"
    >
        <i-option v-for="(items, index) in grant_agent_items" :value="items.value" :key="items.value">
            {{items.label}}
        </i-option>
    </i-select>
    <span class="_forms-tips"><icon type="md-alert"></icon> 可多选发放区域：发放后区域内的用户可领取</span>
</form-item>

<form-item label="发放用户" prop="grant_users_id" v-if="formValidate.grant_method == 3">
    <i-select v-model="formValidate.grant_users_id" placeholder="请选择发放用户"
              multiple filterable
              :loading="grant_users_loading"
    >
        <i-option v-for="(items, index) in grant_users_items" :value="items.value" :key="items.value">
            {{ items.label }} <span style="float:right;color:#ccc">({{items.value}})</span>
        </i-option>
    </i-select>
    <span class="_forms-tips"><icon type="md-alert"></icon> 可多选发放用户：发放后指定的用户可领取</span>
</form-item>

<form-item label="适用平台" prop="grant_platform">
    <radio-group v-model="formValidate.grant_platform"  button-style="solid">
        <template v-for="(items, index) in baseInfoConfig.grant_platform">
            <radio :label="items.value" :value="items.value" :key="items.value" border >{{items.label}}</radio>
        </template>
    </radio-group>
    <span class="_forms-tips"><icon type="md-alert"></icon>互助系统：仅互助系统可使用；商城系统：仅商城系统可使用；</span>
</form-item>

<form-item label="适用类型" prop="grant_errand_method" v-if="formValidate.grant_platform == 2">
    <radio-group v-model="formValidate.grant_errand_method" button-style="solid">
        <template v-for="(items, index) in baseInfoConfig.grant_errand_method">
            <radio :label="items.value" :value="items.value" :key="items.value" border>{{items.label}}</radio>
        </template>
    </radio-group>
    <span class="_forms-tips"><icon type="md-alert"></icon> 指定互助系统使用范围；全部：不限制；</span>
</form-item>

<form-item label="适用类型" prop="grant_ticket_method" v-if="formValidate.grant_platform == 3">
    <radio-group v-model="formValidate.grant_ticket_method"  button-style="solid">
        <template v-for="(items, index) in baseInfoConfig.grant_ticket_method">
            <radio :label="items.value" :value="items.value" :key="items.value" border>{{items.label}}</radio>
        </template>
    </radio-group>
    <span class="_forms-tips"><icon type="md-alert"></icon> 指定商城系统使用范围；全部商家：不限制；指定商家：仅选择商家下产品可使用：指定商家中的产品：仅选择产品可使用；</span>
</form-item>

<form-item label="选择适用商家" prop="grant_ticket_business_id"
           v-if="formValidate.grant_ticket_method == 2 && formValidate.grant_platform == 3">
    <i-select v-model="formValidate.grant_ticket_business_id" placeholder="请选择商家"
              multiple filterable
              :loading="grant_ticket_business_loading"
    >
        <i-option v-for="(items, index) in grant_ticket_business_items" :value="items.value"
                  :key="items.value">{{items.label}}
        </i-option>
    </i-select>
    <span class="_forms-tips"><icon type="md-alert"></icon> 可多选商家；选择后可在指定商家下购买产品时使用；</span>
</form-item>

<form-item label="选择适用产品" prop="grant_ticket_product_id"
           v-if="formValidate.grant_ticket_method == 3 && formValidate.grant_platform == 3">
    <i-select v-model="formValidate.grant_ticket_product_id" placeholder="请选择产品"
              multiple filterable
              :loading="grant_ticket_product_loading"
    >

        <option-group v-for="(items, index) in grant_ticket_product_items" :label="items.label">
            <i-option v-if="items.product.length > 0" v-for="(product, product_index) in items.product"
                      :value="product.value"
                      :key="product.value">
                {{ product.label }} <span
                    style="float:right;color:#ccc">({{items.label}})</span>
            </i-option>
        </option-group>
    </i-select>
    <span class="_forms-tips"><icon type="md-alert"></icon> 可多选产品；选择后可在购买产品时使用；</span>
</form-item>

<div class="forms-inline">
<form-item label="发放开始时间" prop="receive_start_time">
    <date-picker type="datetime" format="yyyy-MM-dd HH:mm" placement="bottom-end" placeholder="请选择发放开始时间" v-model="formValidate.receive_start_time" ></date-picker>
    <span class="_forms-tips"><icon type="md-alert"></icon> 用户开始领取的时间</span>
</form-item>
<form-item label="发放截至时间" prop="receive_end_time">
    <date-picker type="datetime" format="yyyy-MM-dd HH:mm" placement="bottom-end" placeholder="请选择发放截至时间" v-model="formValidate.receive_end_time" ></date-picker>
     <span class="_forms-tips"><icon type="md-alert"></icon> 是指用户领取优惠劵时间结束</span>
</form-item>
</div>
<form-item label="优惠劵使用方式" prop="grant_method">
    <radio-group v-model="formValidate.expiration_method" type="button" button-style="solid">
        <template v-for="(items, index) in baseInfoConfig.expiration_method">
            <radio :label="items.value" :value="items.value" :key="items.value" border>{{items.label}}</radio>
        </template>
    </radio-group>
    <span class="_forms-tips block" v-if="formValidate.expiration_method == 1"><icon type="md-alert"></icon> 时段优惠劵：指定时间段内可以使用；</span>
    <span class="_forms-tips block" v-if="formValidate.expiration_method == 2"><icon type="md-alert"></icon> 时长优惠劵：用户领取后，指定时长内可以使用；</span>
</form-item>
<div class="forms-inline" v-if="formValidate.expiration_method == 1">
    <form-item label="使用开始时间" prop="use_start_time">
        <date-picker type="datetime" format="yyyy-MM-dd HH:mm" placement="bottom-end" placeholder="请选择使用开始时间"  v-model="formValidate.use_start_time" ></date-picker>
        <span class="_forms-tips"><icon type="md-alert"></icon> 优惠劵可以使用的开始时间；</span>
    </form-item>
    <form-item label="使用截至时间" prop="use_end_time">
        <date-picker type="datetime" format="yyyy-MM-dd HH:mm" placement="bottom-end" placeholder="请选择使用截至时间"  v-model="formValidate.use_end_time" ></date-picker>
        <span class="_forms-tips"><icon type="md-alert"></icon> 优惠劵可以使用的截至时间；到时间后未使用优惠劵自动过期</span>
    </form-item>
</div>
<!--<form-item label="使用有效期" prop="use_deadline">-->
<!--    <date-picker type="datetimerange" format="yyyy-MM-dd HH:mm" placement="bottom-end" placeholder="请选择使用有效期" style="width: 315px" v-model="formValidate.use_deadline" ></date-picker>-->
<!--</form-item>-->

<!--<form-item label="截至日期" prop="effective_date" v-if="formValidate.expiration_method == 1">-->
<!--    <date-picker  placeholder="请选择截至日期" style="width: 215px" type="datetime" format="yyyy-MM-dd HH:mm" :model-value="formValidate.effective_date"-->
<!--                 v-model="formValidate.effective_date"></date-picker>-->
<!--    <span class="_forms-tips"><icon type="md-alert"></icon> 指定截至日期，到期后不可用；</span>-->
<!--</form-item>-->

<form-item label="有效时长" prop="effective_days" v-if="formValidate.expiration_method == 2">
    <input-number :min="1" v-model.number="formValidate.effective_days" placeholder="请输入有有效时长"
                  style="width: 215px"></input-number> 时
    <span class="_forms-tips block"><icon type="md-alert"></icon> 有效时长，指优惠劵 <strong color="warning">开始发放时间</strong>与<strong color="warning">发放截至时间</strong>内，用户领取后可在指定时长内使用，到时间后未使用优惠劵自动过期</span>
</form-item>

<form-item label="发放状态" prop="grant_status">
    <radio-group v-model="formValidate.grant_status">
        <template v-for="(items, index) in baseInfoConfig.grant_status">
            <radio :label="items.value" :value="items.value" :key="items.value" border>{{items.label}}</radio>
        </template>
    </radio-group>
<!--    <span class="_forms-tips"><icon type="md-alert"></icon></span>-->
</form-item>
<!--<form-item label="是否可返还" prop="is_return">-->
<!--    <i-switch  v-model="formValidate.is_return" :true-value="1" :false-value="2">-->
<!--        <template #open>-->
<!--            <span>是</span>-->
<!--        </template>-->
<!--        <template #close>-->
<!--            <span>否</span>-->
<!--        </template>-->
<!--    </i-switch>-->
<!--    <span class="_forms-tips"><icon type="md-alert"></icon> 用户退款或取消订单时，是否返还优惠券；</span>-->
<!--</form-item>-->